﻿<Window x:Class="OctopusGUI.TaskActionSelect"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Select Action for Task" Height="300" Width="600" Icon="/OctopusGUI;component/images/logo.ico">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <ListView x:Name="lbAction" SelectionMode="Single" ItemsSource="{Binding ActionCollection}">
            <ListView.View>
                <GridView>
                    <GridView.Columns>
                        <GridViewColumn>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <CheckBox Margin="2" Content="{Binding Name}" IsChecked="{Binding IsSelected,RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListViewItem}}}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView.Columns>
                </GridView>
            </ListView.View>
        </ListView>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Content="OK" Name="btnOK" Margin="2" Width="70" Height="26" Click="btnOK_Click"></Button>
            <Button Content="Cancel" Name="btnCancel" Margin="2" Width="70" Height="26" Click="btnCancel_Click"></Button>
        </StackPanel>
        
    </Grid>
</Window>
